package com.base.common.persistent.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.base.common.persistent.model.Sms;
import com.cjy.common.annotation.MyBatisRepository;

/**
 * 消息通知dao
 * 
 * @author Kevin Colin
 * @datetime 2015年8月14日下午2:54:49
 * 
 */
@MyBatisRepository
public interface SmsMapper {

	/**
	 * 添加短信记录
	 * 
	 * @param sms
	 * @return
	 */
	public int addSms(Sms sms);

	/**
	 * 条件查询信息条数
	 * 
	 * @param sms
	 * @return
	 */
	public int querySmsCountsByFuzzyCondition(
			@Param(value = "uuid") String uuid,
			@Param(value = "categories") int categories,
			@Param(value = "terminalId") int terminalId,
			@Param(value = "type") int type, @Param(value = "status") int status);

	/**
	 * 条件查询信息
	 * 
	 * @param status2
	 * 
	 * @param sms
	 * @return
	 */
	public List<Sms> querySmsByFuzzyCondition(
			@Param(value = "uuid") String uuid,
			@Param(value = "categories") int categories,
			@Param(value = "terminalId") int terminalId,
			@Param(value = "type") int type, @Param(value = "start") int start,
			@Param(value = "end") int end, @Param(value = "status") int status);

	public List<Sms> querySmsByUuid(@Param(value = "uuid") String uuid);

}
